<?php

require_once("../../controllers/init.php");
//require_once("../../controllers/authentication.php");
require_once($FILE_SYSTEM_ROOT."/controllers/authentication.php");
require_once($FILE_SYSTEM_ROOT."/model/classes/events/BookingForm.php");


require_once '../../library/htmltodocx/phpword/PHPWord.php';
require_once '../../library/htmltodocx/simplehtmldom/simple_html_dom.php';
require_once '../../library/htmltodocx/htmltodocx_converter/h2d_htmlconverter.php';
require_once '../../library/htmltodocx/example_files/styles.inc';

// Functions to support this example.
require_once '../../library/htmltodocx/documentation/support_functions.inc';



// HTML fragment we want to parse:
//$html = file_get_contents('../../library/htmltodocx/example_files/example_html.html');
// $html = file_get_contents('test/table.html');


$bookingForm = new BookingForm($_GET['formID']);

$html = "<h1>BOOKING FORM</H1>";
$html .= "<h2>General</h2>";
$html .= $bookingForm->getGeneralHTML();
$html .= "<h2>Vergers</h2>";
$html .= $bookingForm->getVergersHTML();
$html .= "<h2>Music</h2>";
$html .= $bookingForm->getMusicHTML();
$html .= "<h2>Finance</h2>";
$html .= $bookingForm->getFinanceHTML();
$html .= "<h2>Catering</h2>";
$html .= $bookingForm->getCateringHTML();
$html .= "<h2>Publicity</h2>";
$html .= $bookingForm->getPublicityHTML();
$html .= "<h2>Timetable</h2>";
$html .= $bookingForm->getTimetableHTML();
$html .= "<h2>Safeguarding</h2>";
$html .= $bookingForm->getSafeguardingHTML();
$html .= "<h2>Liturgy</h2>";
$html .= $bookingForm->getLiturgyHTML();

$bookingForm->createWordDocument($html);

